const initState = {
  userInfo: localStorage.getItem('userInfo') || null
}

export default (state = initState, action) => {
  if (action.type === 'mutationLogin') {
    return Object.assign({}, state, {
      userInfo: action.value
    })
  }
  
  return state
}
